/*
 * @Description: 资源相关 API
 * @Version: 1.0
 * @Author: Yuanjy
 * @Date: 2020-04-09 17:55:45
 * @LastEditors: Yuanjy
 * @LastEditTime: 2020-04-26 16:43:34
 */
import createAPI from '@/utils/axios'

const resource = {
  //食谱资源相关接口
  recipe: {
    add: config => createAPI('/admin/v1/recipe', 'POST', config),
    edit: config => createAPI('/admin/v1/recipe', 'PUT', config),
    del: id => createAPI('/admin/v1/recipe/' + id, 'DELETE', {}),

    // 获取食谱的下拉列表
    optionList: config => createAPI('/admin/v1/recipe/option-list', 'GET', config),
    // 获取食谱库的信息
    getRecipeLib: config => createAPI('/admin/v1/recipe/lib-list', 'GET', config),
    // 修改食谱的状态
    changeStatus: config => createAPI('/admin/v1/recipe/change-status', 'PUT', config),
  },
}

export default resource
